Add Card Rat tutorial flow using shared tutorial framework - #129
Conversation
Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
…Needed Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
…als' of github.com:acrosman/BrainSpeedExercises into copilot/copilotcreate-general-framework-for-game-tutorials * 'copilot/copilotcreate-general-framework-for-game-tutorials' of github.com:acrosman/BrainSpeedExercises: Initial plan
acrosman
left a comment
There was a problem hiding this comment.
I've rebased this branch to have the correct base so you have the framework you need to complete the work. It appears no code was actually altered in the initial attempt. Please try again using the framework now included in this branch.
|
@copilot create a tutorial for the Card Rat game. Update this PR to merge into |
Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
Implemented in commit |
acrosman
left a comment
There was a problem hiding this comment.
@copilot more changes are needed.
The tutorial should be in its own file not buried in index.js. Call it tutorial.js and move its tests to their own file as well.
To help explain the game I've added a screenshot that shows the basic game play layout at: app/games/card-rat/images/tutorialScreenshot.png. The current tutorial doesn't show the game at all, it just describes it. Use this screenshot, with colored overlays to help point out elements of the interface.
Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
Implemented in
|
Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
| export async function getTutorialSteps() { | ||
| const screenshotStepMarkup = await loadScreenshotStepMarkup(); | ||
|
|
||
| return [ |
There was a problem hiding this comment.
@copilot There should be no markup in code. All of this should have been moved not just the code related to the screenshot.
There was a problem hiding this comment.
Addressed in 840dbeb.
All Card Rat tutorial step markup has been moved out of tutorial.js into dedicated HTML files, and tutorial.js now only loads external step files and returns structured step data.
Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com>
Completed in I fixed the review issues, resolved the failing Card Rat tests by updating async test expectations around
|

Card Rat now uses the shared tutorial overlay framework so first-time players get a guided walkthrough, while returning players can start immediately. The instructions screen also adds an explicit replay path for players who want to re-run the tutorial.
Tutorial integration in game lifecycle (
app/games/card-rat/index.js)TUTORIAL_STEPS.showTutorialIfNeeded(...)so unseen players get the overlay before gameplay starts.showTutorial(...)for explicit tutorial re-runs.Instructions UI updates (
app/games/card-rat/interface.html,style.css)Focused plugin tests (
app/games/card-rat/tests/index.test.js)showTutorialIfNeeded(...).showTutorial(...).